﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Lk.Api.JwtTokenAuth;
using Lk.Common.Helper;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Lk.Api.Controllers
{
    //[Route("api/v{version:apiVersion}/[controller]")]
    [Route("api/v{version:apiVersion}/[controller]")]
    [ApiVersion("1")]
    [EnableCors("AllowSpecificOrigin")]
    [Authorize(Policy = "Client")]
    public class BaseApiController : ControllerBase
    {

        internal readonly string AppId = ConfigHelper.GetSection("appId");
        internal readonly string Secret = ConfigHelper.GetSection("secret");
        internal readonly string AppletAppId = ConfigHelper.GetSection("appletAppId");
        internal readonly string AppletSecret = ConfigHelper.GetSection("appletSecret");
        internal readonly string Token = ConfigHelper.GetSection("Token");
        internal readonly string ShopingUrl = ConfigHelper.GetSection("shopingUrl");
        internal readonly Guid ScoreRuleId = new Guid("6B8F7B93-93DB-4922-99B7-CD1EDE54EB1C");
        internal readonly string EncryptionCode = "5iEnglish678";
        internal readonly string AuthorizationCode = "authorization";

        internal string UnionId { get; set; } = "o_RFw01tY6pAOgL-kE1HOGeT8JB0";
        //internal Guid CurrentUserId { get; set; }


        //internal string UnionId { get; set; } = "o_RFw01LeKMQAuqg6AzEJ8Cmlj4M";
         internal Guid CurrentUserId = new Guid("F31C04A9-DEF3-41C0-B26E-D5497CCA3EEB");
        internal const int PageSize = 5;

       // internal readonly Guid UserId =

    }
}